package javaAPI.System类和Runtime类;
//arraycopy()方法的使用
import java.util.Arrays;
public class arraycopy {
    public static void main(String[] args) {
        int[] fromArray = {1,2,3,4,5,6,7,8,9,10};
        int[] toArray = {20,30,40,50,60,70,80,90,100};
        System.arraycopy(fromArray,2,toArray,3,4);//原数组，原数组复制元素的起始位置，目标数组，复制到目标数组的起始位置
        System.out.println(Arrays.toString(toArray));
    }
}
